package itheima06;

import org.junit.Test;

/*
    自定义注解基本使用

    1.使用格式:
        @注解名称(属性名称1=属性值1,属性名称2=属性值2...)

    2.可以使用在哪些位置? 包、类、字段、方法、局部变量、方法参数等

    3.注意:
        (1)空注解可以直接使用
        (2)属性是数组,使用时,多个值用{}括起来
        (3)属性是数组,只有一个个值{}可以省略
        (4)有默认值的属性,可以省略不写
 */
//@MyAnno01
//@MyAnno02(name = "张三", age = 28, hobbies = {"打球","跳舞","撸代码"},aabb = @MyAnno01)
//@MyAnno02(name = "张三", age = 28, hobbies = "撸代码",aabb = @MyAnno01)
//@MyAnno02(name = "张三",hobbies = "撸代码",aabb = @MyAnno01)
public class Demo07UseAnnotation {
    @Test
    @Testb
    @MyAnno01
    @MyAnno02(name = "李四",hobbies = "看小说",aabb = @MyAnno01)
    public void test() {
        System.out.println("test...");
    }
}

 /*   @MyAnno02(name = "yny",hobbies = {"吃","睡觉","喝水"},aabb = @MyAnno01())
public class Demo07UseAnnotation {
    @Test
    @MyAnno01
    @MyAnno02(name = "wkr",hobbies = "吃",aabb=@MyAnno01)
    public void  test(){
        System.out.println("y=======");
    }
}*/